package week7;
import java.util.*;

public class Main113 {

 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);
     while(in.hasNext()){
         System.out.println(isPalindrome(in.nextLine()));
     }
 }

 public static  boolean isPalindrome(String str){
  List<Character>  stack = new ArrayList<Character>();
  List<Character>  stack2 = new ArrayList<Character>();
  for(int i=0;i<str.length()/2;i++){
   stack.add(str.charAt(i));
   stack2.add(str.charAt(str.length()-i-1));
  }
  for(int i=str.length()/2-1;i>=0;i--){
   if(stack.remove(i) != stack2.remove(i)){
    return false;
   }
  }
  return true;
 }
}